Skip to content

Add sphinx-multiversion for firmware version-based docs#6

Closed
YanNaingWinn wants to merge 2 commits into
mainfrom
feature/sphinx_documentation_rtd_theme
Closed

Add sphinx-multiversion for firmware version-based docs#6
YanNaingWinn wants to merge 2 commits into
mainfrom
feature/sphinx_documentation_rtd_theme

Conversation

@YanNaingWinn

@YanNaingWinn YanNaingWinn commented Mar 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Integrates sphinx-multiversion so each card firmware version (e.g., v1.6.1) gets its own docs at docs.cryptnox.com/{version}/
  • Users can switch between versions via a dropdown in the RTD sidebar (bottom of the left panel), similar to ESP-IDF docs
  • Root docs.cryptnox.com redirects automatically to the latest released version branch

Changes

File Description
requirements.txt Added sphinx-multiversion
docs/source/conf.py Added smv_* whitelist/pattern settings
.github/workflows/deploy.yml Switched to sphinx-multiversion build; added smart root redirect that checks version branches then falls back to main
docs/source/_templates/versioning.html New version selector dropdown UI
docs/source/_templates/layout.html Injects version selector into RTD footer block
docs/make.bat Windows Sphinx build helper
README.md Documents versioning workflow and URL structure

How to activate after merge

After this PR merges to main, create and push the first version branch to make the selector live:

git checkout main && git pull
git checkout -b v1.6.1
git push origin v1.6.1

CI will then build both main/ and v1.6.1/ and the version dropdown will appear in the sidebar.

Test plan

  • Merge to main
  • Create v1.6.1 branch and push
  • Confirm CI builds both _site/main/ and _site/v1.6.1/
  • Confirm docs.cryptnox.com redirects to docs.cryptnox.com/v1.6.1/
  • Confirm version dropdown appears in RTD sidebar with both versions listed

Closes #

🤖 Generated with Claude Code

YanNaingWinn and others added 2 commits March 26, 2026 23:58
Integrates sphinx-multiversion so each card firmware version (v1.6.1,
v1.6.2, …) gets its own docs at docs.cryptnox.com/{version}/.  Users can
switch between versions via a dropdown in the RTD sidebar.

- requirements.txt: add sphinx-multiversion dependency
- conf.py: configure smv_* whitelist/pattern settings
- deploy.yml: build all versions; root redirect falls back to latest
  version branch when no tags exist
- _templates/versioning.html: version selector dropdown UI
- _templates/layout.html: inject version selector into footer block
- docs/make.bat: Windows Sphinx build helper
- README.md: document versioning workflow and URL structure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sphinx-multiversion 0.2.4 is incompatible with Sphinx 8.x (Config.read()
signature change). Pin to Sphinx 7.x until a compatible version is available.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@YanNaingWinn YanNaingWinn requested a review from embarquech March 26, 2026 18:57
@YanNaingWinn YanNaingWinn deleted the feature/sphinx_documentation_rtd_theme branch March 27, 2026 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant